package com.ruoyi.electronicFence.mapper;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.electronicFence.domain.TEfHistoryEquipmentStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 场所（监测点）状态历史Mapper接口
 *
 * @author sxygsj
 * @date 2024-08-13
 */
@Mapper
@DataSource(value = DataSourceType.SLAVE)
public interface TEfHistoryEquipmentStatusMapper
{
    /**
     * 查询场所（监测点）状态历史
     *
     * @param id 场所（监测点）状态历史主键
     * @return 场所（监测点）状态历史
     */
    public TEfHistoryEquipmentStatus selectTEfHistoryEquipmentStatusById(Long id);

    /**
     * 查询场所（监测点）状态历史
     *
     * @param id 场所（监测点）状态历史主键
     * @return 场所（监测点）状态历史
     */
//    @Select("select id, unit_code, area_id, area_name, area_type, equipment_code, equipment_type, equipment_name, device_id, " +
//            "device_name, device_type, equipment_status, controller_id, data_time, alarm_type, duration_seconds, duration_seconds_str, " +
//            "status_start_dateTime from t_ef_history_equipment_status")
    public TEfHistoryEquipmentStatus selectTEfHistoryEquipmentStatusLast(TEfHistoryEquipmentStatus tEfHistoryEquipmentStatus);

    /**
     * 查询场所（监测点）状态历史列表
     *
     * @param tEfHistoryEquipmentStatus 场所（监测点）状态历史
     * @return 场所（监测点）状态历史集合
     */
    public List<TEfHistoryEquipmentStatus> selectTEfHistoryEquipmentStatusList(TEfHistoryEquipmentStatus tEfHistoryEquipmentStatus);

    /**
     * 新增场所（监测点）状态历史
     *
     * @param tEfHistoryEquipmentStatus 场所（监测点）状态历史
     * @return 结果
     */
    public int insertTEfHistoryEquipmentStatus(TEfHistoryEquipmentStatus tEfHistoryEquipmentStatus);

    /**
     * 修改场所（监测点）状态历史
     *
     * @param tEfHistoryEquipmentStatus 场所（监测点）状态历史
     * @return 结果
     */
    public int updateTEfHistoryEquipmentStatus(TEfHistoryEquipmentStatus tEfHistoryEquipmentStatus);

    /**
     * 删除场所（监测点）状态历史
     *
     * @param id 场所（监测点）状态历史主键
     * @return 结果
     */
    public int deleteTEfHistoryEquipmentStatusById(Long id);

    /**
     * 批量删除场所（监测点）状态历史
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTEfHistoryEquipmentStatusByIds(Long[] ids);
}
